//利用PWM完成一个LED Fade in & Fade out的Arduino 实验
const int analogOutPin = 6;  // PWM output pin
int ledLight = 0;        //PWM Value
//初始化
void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}
//循环体
void loop() {
  ledLight++;
  ledLight %= 256;
  analogWrite(analogOutPin, ledLight);
}
